package c.e.b.f;

import android.os.Bundle;
import c.e.a.b.b.j.c;
import c.e.a.b.e.c.ec;
import c.e.a.b.e.c.g;
import c.e.a.b.e.c.i;
import c.e.a.b.e.c.k;
import c.e.a.b.e.c.l;
import c.e.a.b.e.c.p;
import c.e.a.b.e.c.q;
import c.e.a.b.e.c.r;
import c.e.a.b.e.c.s;
import c.e.a.b.e.c.t;
import c.e.a.b.e.c.u;
import c.e.a.b.e.c.w;
import c.e.a.b.e.c.x;
import c.e.a.b.e.c.z;
import c.e.a.b.f.b.b7;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Random;

/* compiled from: com.google.android.gms:play-services-measurement-api@@18.0.0 */
public final class b implements b7 {
    public final /* synthetic */ g a;

    public b(g gVar) {
        this.a = gVar;
    }

    public final void a(String str) {
        g gVar = this.a;
        Objects.requireNonNull(gVar);
        gVar.c.execute(new q(gVar, str));
    }

    public final int b(String str) {
        g gVar = this.a;
        Objects.requireNonNull(gVar);
        ec ecVar = new ec();
        gVar.c.execute(new z(gVar, str, ecVar));
        Integer num = (Integer) ec.J0(ecVar.L0(10000), Integer.class);
        if (num == null) {
            return 25;
        }
        return num.intValue();
    }

    public final List<Bundle> c(String str, String str2) {
        g gVar = this.a;
        Objects.requireNonNull(gVar);
        ec ecVar = new ec();
        gVar.c.execute(new k(gVar, str, str2, ecVar));
        List<Bundle> list = (List) ec.J0(ecVar.L0(5000), List.class);
        return list == null ? Collections.emptyList() : list;
    }

    public final void d(String str) {
        g gVar = this.a;
        Objects.requireNonNull(gVar);
        gVar.c.execute(new p(gVar, str));
    }

    public final Map<String, Object> e(String str, String str2, boolean z) {
        g gVar = this.a;
        Objects.requireNonNull(gVar);
        ec ecVar = new ec();
        gVar.c.execute(new w(gVar, str, str2, z, ecVar));
        Bundle L0 = ecVar.L0(5000);
        if (L0 == null || L0.size() == 0) {
            return Collections.emptyMap();
        }
        Map<String, Object> hashMap = new HashMap(L0.size());
        for (String str3 : L0.keySet()) {
            Object obj = L0.get(str3);
            if ((obj instanceof Double) || (obj instanceof Long) || (obj instanceof String)) {
                hashMap.put(str3, obj);
            }
        }
        return hashMap;
    }

    public final String f() {
        g gVar = this.a;
        Objects.requireNonNull(gVar);
        ec ecVar = new ec();
        gVar.c.execute(new s(gVar, ecVar));
        return ecVar.K0(500);
    }

    public final long g() {
        g gVar = this.a;
        Objects.requireNonNull(gVar);
        ec ecVar = new ec();
        gVar.c.execute(new u(gVar, ecVar));
        Long l = (Long) ec.J0(ecVar.L0(500), Long.class);
        if (l != null) {
            return l.longValue();
        }
        long nanoTime = System.nanoTime();
        Objects.requireNonNull((c) gVar.b);
        long nextLong = new Random(nanoTime ^ System.currentTimeMillis()).nextLong();
        int i = gVar.f + 1;
        gVar.f = i;
        return nextLong + ((long) i);
    }

    public final void h(String str, String str2, Bundle bundle) {
        g gVar = this.a;
        Objects.requireNonNull(gVar);
        gVar.c.execute(new l(gVar, str, str2, bundle));
    }

    public final void i(String str, String str2, Bundle bundle) {
        this.a.c(str, str2, bundle, true, true, null);
    }

    public final void p(Bundle bundle) {
        g gVar = this.a;
        Objects.requireNonNull(gVar);
        gVar.c.execute(new i(gVar, bundle));
    }

    public final String q() {
        g gVar = this.a;
        Objects.requireNonNull(gVar);
        ec ecVar = new ec();
        gVar.c.execute(new t(gVar, ecVar));
        return ecVar.K0(500);
    }

    public final String r() {
        g gVar = this.a;
        Objects.requireNonNull(gVar);
        ec ecVar = new ec();
        gVar.c.execute(new x(gVar, ecVar));
        return ecVar.K0(500);
    }

    public final String s() {
        g gVar = this.a;
        Objects.requireNonNull(gVar);
        ec ecVar = new ec();
        gVar.c.execute(new r(gVar, ecVar));
        return ecVar.K0(50);
    }
}
